/*
 Navicat Premium Data Transfer

 Source Server         : ruipeng
 Source Server Type    : MySQL
 Source Server Version : 50729
 Source Host           : 101.200.133.224:3306
 Source Schema         : rabbitmq-demo

 Target Server Type    : MySQL
 Target Server Version : 50729
 File Encoding         : 65001

 Date: 17/05/2021 16:50:35
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for msg_log
-- ----------------------------
DROP TABLE IF EXISTS `msg_log`;
CREATE TABLE `msg_log` (
  `msg_id` varchar(255) NOT NULL DEFAULT '' COMMENT '消息唯一标识',
  `msg` text COMMENT '消息体, json格式化',
  `exchange` varchar(255) NOT NULL DEFAULT '' COMMENT '交换机',
  `routing_key` varchar(255) NOT NULL DEFAULT '' COMMENT '路由键',
  `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态: 0投递中 1投递成功 2投递失败 3已消费',
  `try_count` int(11) NOT NULL DEFAULT '0' COMMENT '重试次数',
  `next_try_time` datetime DEFAULT NULL COMMENT '下一次重试时间',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`msg_id`),
  UNIQUE KEY `unq_msg_id` (`msg_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='消息投递日志';

-- ----------------------------
-- Records of msg_log
-- ----------------------------
BEGIN;
INSERT INTO `msg_log` VALUES ('50468531-53ca-4106-820e-67d58b3a4441', '{\"to\":\"rui@126.com\",\"title\":\"这是标题\",\"content\":\"这是一个测试邮件\",\"msgId\":\"50468531-53ca-4106-820e-67d58b3a4441\"}', 'mail.exchange', 'mail.routing.key', 1, 2, '2021-05-07 15:37:55', '2021-05-07 15:35:55', '2021-05-07 15:35:55');
INSERT INTO `msg_log` VALUES ('51cff787-77af-46d2-9988-96732eb289af', '{\"to\":\"rui@126.com\",\"title\":\"这是标题\",\"content\":\"这是一个测试邮件\",\"msgId\":\"51cff787-77af-46d2-9988-96732eb289af\"}', 'mail.exchange', 'mail.routing.key', 3, 0, '2021-05-07 15:48:36', '2021-05-07 15:46:36', '2021-05-07 15:46:36');
INSERT INTO `msg_log` VALUES ('65e8b4ed-b2e3-48e7-8edc-06224fff3da9', '{\"to\":\"rui@126.com\",\"title\":\"这是标题\",\"content\":\"这是一个测试邮件\",\"msgId\":\"65e8b4ed-b2e3-48e7-8edc-06224fff3da9\"}', 'mail.exchange', 'mail.routing.key', 3, 0, '2021-05-07 15:40:54', '2021-05-07 15:38:54', '2021-05-07 15:38:54');
INSERT INTO `msg_log` VALUES ('cf843ff9-531a-44ad-bf49-3c619c0d07b1', '{\"to\":\"rui@126.com\",\"title\":\"这是标题\",\"content\":\"这是一个测试邮件\",\"msgId\":\"cf843ff9-531a-44ad-bf49-3c619c0d07b1\"}', 'mail.exchange', 'mail.routing.key', 3, 0, '2021-05-07 15:51:19', '2021-05-07 15:49:19', '2021-05-07 15:49:19');
INSERT INTO `msg_log` VALUES ('d17cb4af-1a13-4893-a888-25ea16d0828e', '{\"to\":\"rui@126.com\",\"title\":\"这是标题\",\"content\":\"这是一个测试邮件\",\"msgId\":\"d17cb4af-1a13-4893-a888-25ea16d0828e\"}', 'mail.exchange', 'mail.routing.key', 3, 0, '2021-05-07 15:45:13', '2021-05-07 15:43:13', '2021-05-07 15:43:13');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
